<template>
   <div class="hot-list">
      <div class="hot-list-title">
        <img class="hot-title-img" src="https://imgs.qunarzz.com/piao/fusion/1711/16/bfbb9874e8f11402.png" alt="本周热门榜单">
        <span class="hot-title">本周热门榜单</span>
        <a href="#" class="hot-title-more">
          全部榜单 >
          <span></span>
        </a>
      </div>
      <ul class="hot-lists">
        <li class="hot-lists-item" v-for="item of hotlist" :key="item.id">
          <div class="hot-list-imgcon image-ready">
            <img :src="item.imgUrl" :alt="item.title">
          </div>
          <div class="hot-list-tag" v-if="item.id == '1' || item.id == '2' || item.id == '3'">
            <img :src="item.imgTop">
          </div>
          <div class="hot-list-sight">{{ item.title }}</div>
          <div class="hot-list-price"><span class="hot-price">¥<em class="hot-price-num">{{ item.price }}</em></span>起</div>
        </li>
      </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeHot',
  data () {
    return {
      hotlist: [
        { id: '1', imgTop: 'https://imgs.qunarzz.com/piao/fusion/1710/ab/159673b63e6ca702.png', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1409/19/adca619faaab0898245dc4ec482b5722.jpg_250x250_0fc722c0.jpg', title: '故宫', price: '40' },
        { id: '2', imgTop: 'https://imgs.qunarzz.com/piao/fusion/1710/2d/36d0c4adaebbbc02.png', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1708/2b/2b3b94de99c0a425a3.img.jpg_250x250_50c99cf3.jpg', title: '八达岭长城', price: '35' },
        { id: '3', imgTop: 'https://imgs.qunarzz.com/piao/fusion/1710/67/edc47ffef9e96b02.png', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1505/f5/f5f45e1a83537bcb.water.jpg_250x250_63e3520a.jpg', title: '圆明园', price: '25' },
        { id: '4', imgUrl: 'https://imgs.qunarzz.com/sight/p0/201403/07/a3231208ca4095bef77068c202d95bd2.jpg_250x250_6fea594a.jpg', title: '香山公园', price: '12' },
        { id: '5', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1708/2b/2b6378fd3b2e1d86a3.img.jpg_250x250_b256890e.jpg', title: '慕田峪长城', price: '37 ' },
        { id: '6', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1603/85/85c883189bf7293390.water.jpg_250x250_090a42b6.jpg', title: '什刹海', price: '5' },
        { id: '7', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1602/92/920e47352552c1c990.water.jpg_250x250_ee99c18e.jpg', title: '天坛公园', price: '13.5' },
        { id: '8', imgUrl: 'https://imgs.qunarzz.com/sight/p0/1508/fe/434ee530e21f1c11bad088e8cc8d5e93.water.jpg_250x250_12e8154c.jpg', title: '鸟巢', price: '52.5' }
      ]
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  .hot-list-title
    margin 20px 0
    img
      width 0.3rem
      height 0.3rem
      margin-left 0.2rem
    .hot-title
      display inline-block
      margin-left .08rem
      height .44rem
      color #212121
      font-size 0.32rem
      line-height 0.44rem
    .hot-title-more
      float right
      color #616161
      font-size 0.28rem
  .hot-lists
    padding 0 .24rem
    overflow-x scroll
    white-space nowrap
    .hot-lists-item
      position relative
      display inline-block
      padding 0.06rem 0 0.2rem
      width 2rem
      margin-right 0.2rem
      .hot-list-imgcon
        img
          width 100%
      .hot-list-tag
        position absolute
        top 0
        left 0
        img
          height 0.4rem
          width 0.84rem
      .hot-list-sight
        text-align center
        margin-top 0.12rem
      .hot-list-price
        text-align center
        margin-top 0.12rem
        span
          color #ff8300
 </style>
